package com.qingcheng.service.order;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName:qingcheng_parent
 * @InterfaceName:CartService
 * @Time: 2019/7/17
 * @Author: zhou24
 * @Description:
 * @Experience:
 */
public interface CartService {

    public List<Map<String, Object>> findCartList(String username);

    /**
     * 添加商品到购物车
     *
     * @param username
     * @param skuId
     * @param num
     */
    void addItem(String username, String skuId, Integer num);

    /**
     * 更新选中状态
     *
     * @param username
     * @param skuId
     * @param checked
     */
    boolean updateChecked(String username, String skuId, boolean checked);

    /**
     * 删除选中的购物车
     *
     * @param username
     */
    void deleteCheckedCart(String username);

    /**
     * 计算当前选中的购物车的优惠金额
     *
     * @param
     * @return
     */
    int preferential(String username);

    /**
     * 获取最新的购物车列表
     * @param username
     * @return
     */
    List<Map<String, Object>> findNewOrderItemList(String username);

}
